using UniversalAdminSystem.Application.PermissionManagement.DTOs;

namespace UniversalAdminSystem.Application.PermissionManagement.Interfaces;

/// <summary>
/// 权限管理应用服务接口
/// 提供权限的创建、查询、分配等业务操作
/// </summary>
public interface IPermissionManagementAppService
{
    /// <summary>
    /// 获取所有权限列表
    /// </summary>
    /// <returns>权限列表</returns>
    Task<IEnumerable<PermissionDto>> GetAllPermissionAsync();

    /// <summary>
    /// 创建新权限
    /// </summary>
    /// <param name="createDto">权限创建数据传输对象</param>
    /// <returns>创建的权限信息</returns>
    Task<PermissionDto> CreatePermissionAsync(PermissionCreateDto createDto);

    /// <summary>
    /// 删除权限
    /// </summary>
    /// <param name="permissionId">权限ID</param>
    /// <returns>删除操作结果</returns>
    Task RemovePermissionAsync(Guid permissionId);

    /// <summary>
    /// 为角色分配权限
    /// </summary>
    /// <param name="assignDto">权限分配数据传输对象</param>
    /// <returns>分配操作结果</returns>
    Task AssignPermissionToRoleAsync(AssignPermissionDto assignDto);
}